/*
 * UVG - Programación orientada a objetos
 * Proyecto No. 2: Cartera virtual
 * Autores: Ana Guisela Alfaro, Manuel Arana, Freddy Chinchilla
 * Archivo: MainScreen.java
 * Descripción: Pantalla inicial de la aplicación. Entorno gráfico. 
 */

/*
 *
 * @author Usuario
 */
public class MainScreen extends javax.swing.JFrame {

    /** Creates new form MainScreen */
    public MainScreen() {
        initComponents();        
        this.setSize(400,300);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        Salir = new javax.swing.JButton();
        IngresarAMiCartera = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();

        setTitle("JavaPocket");
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        getContentPane().setLayout(null);

        Salir.setText("Salir");
        Salir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SalirActionPerformed(evt);
            }
        });
        getContentPane().add(Salir);
        Salir.setBounds(100, 160, 180, 70);

        IngresarAMiCartera.setText("Ingresar a mi cartera");
        IngresarAMiCartera.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                IngresarAMiCarteraActionPerformed(evt);
            }
        });
        getContentPane().add(IngresarAMiCartera);
        IngresarAMiCartera.setBounds(100, 70, 180, 70);

        jLabel1.setFont(new java.awt.Font("Lucida Console", 1, 11));
        jLabel1.setText("Bienvenido a JavaPocket.");
        getContentPane().add(jLabel1);
        jLabel1.setBounds(100, 10, 190, 58);

        jLabel2.setIcon(new javax.swing.ImageIcon("C:\\Users\\Usuario\\Documents\\NetBeansProjects\\CarteraVirtuall\\CarteraVirtual\\CartVirt\\lockpad.png")); // NOI18N
        getContentPane().add(jLabel2);
        jLabel2.setBounds(170, 40, 220, 230);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void SalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SalirActionPerformed
        //Cerrar la aplicación al presionar dicho botón.
        System.exit(1);
    }//GEN-LAST:event_SalirActionPerformed

    private void IngresarAMiCarteraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_IngresarAMiCarteraActionPerformed
        //Abrir ventana de inicio de sesión al presionar dicho botón.
        LoggingIn newsession = new LoggingIn();
        newsession.setLocationRelativeTo(null);
        newsession.setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_IngresarAMiCarteraActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(MainScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(MainScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(MainScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(MainScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new MainScreen().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton IngresarAMiCartera;
    private javax.swing.JButton Salir;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    // End of variables declaration//GEN-END:variables
}
